<?php
	require_once '../../model/global.inc.php';  
?>
<?php
 if(isset($_GET['idProduct'])) {
	require_once "../json/JSON.php";
	$json = new Services_JSON();
	$id = $_GET['idProduct'];
	//convert php object to json 
	
	$result = mysql_query("select tblmember.email, tblmemberwon.soldfor, tblmemberwon.sold_date from tblmember,tblmemberwon where pro_id = '$id' and tblmember.memid = tblmemberwon.memid order by win_id desc limit 0,1");            //query
	$value = mysql_fetch_array($result);
	$output = $json->encode($value);	
	print($output);
}
?>